home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / JOYSTICK.SWG / 0004_JOYSTCK4.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  502b  |  21 lines

  1.  
  2. Anyone know how to read the Joystick....
  3.  
  4. if you are using an AT (286 or later), here's the easy way.
  5. Use Intr ($15, Regs), and load AH With the $84, then load
  6. DX With 1 to get the joystick status' and 0 to get the
  7. button status.  if you use DX=1, it returns:
  8.  
  9. AX x of joystick A
  10. BX y of joystick A
  11. CX x of joystick B
  12. DX y of joystick B
  13.  
  14. if you use DX=0:
  15.  
  16. AL button status, bit #
  17.    4 joystick A,button 1
  18.    5 joystick A,button 2
  19.    6 joystick B,button 1
  20.    7 joystick B,button 2
  21.